<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:71:"/www/wwwroot/xunda-college/application/atxunda/view/privilege/edit.html";i:1700617175;s:69:"/www/wwwroot/xunda-college/application/atxunda/view/index/header.html";i:1700617178;}*/ ?>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<title>后台管理系统</title>
<link rel="stylesheet" href="__PUBLIC__css/pintuer.css?v=1.0">
<link rel="stylesheet" href="__PUBLIC__admin/admin.css">
<link rel="stylesheet" href="__PUBLIC__layui/css/layui.css">
<script src="__PUBLIC__js/jquery.js"></script>
<script src="__PUBLIC__js/pintuer.js"></script>
<script src="__PUBLIC__js/cookie.js"></script>
<script src="__PUBLIC__layui/layui.js"></script>
</head>
<style type="text/css">
	.refresh{width: 20px;height: 20px;float: right;margin:10px 20px;display: block;}
</style>
</head>
<?php if(request()->controller() != 'Index'): ?><img src="__PUBLIC__images/refresh.png" class="refresh" title="刷新"><?php endif; ?>
<script type="text/javascript">
	$('.refresh').click(function(){layer.msg('刷新中……');window.location.reload();})
</script>
<script type="text/javascript">
	function openwinx(url,name,w,h) {
		if(!w) w=screen.width-4;
		if(!h) h=screen.height-95;
		window.open(url,name,"width=" + w + ",height=" + h + ",toolbar=no,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no");
	}
</script>
<body>
<div class="panel admin-panel margin-top" id="add">
  <div class="panel-head"><strong><span class="icon-pencil-square-o"></span> 增加内容</strong></div>
  <div class="body-content">
    <form method="post" class="form-x" action="<?php echo url('privilege/edit'); ?>">    
      <div class="form-group">
        <div class="label">
          <label>权限名称：</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" value="<?php echo $privilege_data['privilege_name']; ?>" name="privilege_name" placeholder="请输入权限名称" data-validate="required:请输入权限名称" />
          <div class="tips"></div>
        </div>
      </div>
      <div class="form-group">
          <div class="label">
            <label>父级权限：</label>
          </div>
          <div class="field">
            <select name="parent_id" class="input w50">
              <option value="0">顶级权限</option>
              <?php if(is_array($data) || $data instanceof \think\Collection): if( count($data)==0 ) : echo "" ;else: foreach($data as $key=>$v): ?>
              <option value="<?php echo $v['privilege_id']; ?>"<?php if($privilege_data['parent_id']==$v['privilege_id']){echo 'selected';}?>><?php echo str_repeat("&nbsp;&nbsp;",$v['level']*2).$v['privilege_name'];   ?></option>
              <?php endforeach; endif; else: echo "" ;endif; ?>
            </select>  
            <div class="tips"></div>
          </div>
        </div>
        <div class="form-group">
        <div class="label">
          <label>控制器名称：</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" value="<?php echo $privilege_data['controller_name']; ?>" name="controller_name" placeholder="请输入控制器名称" data-validate="required:请输入控制器名称" />
          <div class="tips"></div>
        </div>
      </div>
      <div class="form-group">
      <div class="label">
          <label>方法名称：</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" value="<?php echo $privilege_data['action_name']; ?>" name="action_name" placeholder="请输入方法名称" data-validate="required:请输入方法名称" />
          <div class="tips"></div>
        </div>
      </div>
      <div class="form-group">
        <div class="label">
          <label>显示：</label>
        </div>
        <div class="field">
          <div class="button-group radio">
          
          <label class="button <?php if($privilege_data['privilege_status'] == 1): ?> active <?php endif; ?>">
            <span class="icon icon-check"></span>             
              <input name="privilege_status" value="1" type="radio" <?php if($privilege_data['privilege_status'] == 1): ?>  checked="checked" <?php endif; ?>>是             
          </label>             
        
          <label class="button <?php if($privilege_data['privilege_status'] == 0): ?> active <?php endif; ?>">
              <span class="icon icon-times"></span>            
              <input name="privilege_status" value="0"  type="radio" <?php if($privilege_data['privilege_status'] == 0): ?>  checked="checked" <?php endif; ?>>否
          </label>         
           </div>       
        </div>
     </div>
     <input type="hidden" name="privilege_id" value="<?php echo $privilege_data['privilege_id']; ?>">
      <div class="form-group">
        <div class="label">
          <label></label>
        </div>
        <div class="field">
          <button class="button bg-main icon-check-square-o" type="submit"> 提交</button>
        </div>
      </div>
    </form>
  </div>
</div>
</body></html>